Q inplace Class
This tool generates an inline editor, along with a form tag.
Constructor
Q inplace
-
[$options]
Parameters:
-
[$options]
Array optionalAn associative array of parameters, containing:
-
fieldInput
StringRequired. HTML representing a text input, textarea, or select.
-
staticHtml
StringRequired. The static HTML to display when the input isn't showing.
-
[type='textarea']
String optionalThe type of the input. Can be "textarea", "text" or "select"
-
[action=""]
String optionalThe uri or url to submit to
-
[method="put"]
String optionalThe method to use for submitting the form.
-
[editing]
Boolean optionalIf true, then renders the inplace tool in editing mode.
-
[editOnClick=true]
Boolean optionalIf true, then edit mode starts only if "Edit" button is clicked.
-
[selectOnEdit=true]
Boolean optionalIf true, selects all the text when entering edit mode.
-
[placeholder]
String optionalText to show in the staticHtml or input field when the editor is empty
-
[hidden]
Array optionalAn associative array of additional hidden fields to submit in the form
-
[maxWidth]
Integer optionalThe maximum width for the Q/autogrow
-
[beforeSave]
String optionalReference to a callback to call after a successful save. This callback can cancel the save by returning false.
-
[onSave]
String optionalReference to a callback or event to run after a successful save.
-
[onCancel]
String optionalReference to a callback or event to run after cancel.
-